From bb315e238429926ad570185fbdcad8ace008a791 Mon Sep 17 00:00:00 2001 From: Keir Fraser Date: Fri, 23 Apr 2010 08:38:35 +0100 Subject: [PATCH] cpupools: optimise domain creation if pool movement is a no-op Signed-off by: Juergen Gross --- xen/common/cpupool.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xen/common/cpupool.c b/xen/common/cpupool.c index 7e32296061..6baedd0e14 100644 --- a/xen/common/cpupool.c +++ b/xen/common/cpupool.c @@ -520,6 +520,12 @@ addcpu_out: rcu_unlock_domain(d); break; } + if ( op->cpupool_id == d->cpupool->cpupool_id ) + { + ret = 0; + rcu_unlock_domain(d); + break; + } printk(XENLOG_DEBUG "cpupool move_domain(dom=%d)->pool=%d\n", d->domain_id, op->cpupool_id); ret = -ENOENT; -- 2.30.2